import 'package:equatable/equatable.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_roujiaosuo/flutter_bloc/requests/models/home_top_model.dart';
import 'package:meta/meta.dart';

@immutable
abstract class HomeState extends Equatable {
  HomeState([List props = const []]) : super(props);
}

class InitialHomeState extends HomeState {}

class LoadingHomeState extends HomeState {}

class LoadedHomeState extends HomeState {
  LoadedHomeState({@required this.homeTopModel})
      : assert(homeTopModel != null),
        super();
  final HomeTopModel homeTopModel;
}

class ErrorHomeState extends HomeState {}

class HomeScrollOffsetState extends HomeState {
  final double offset;
  HomeScrollOffsetState({@required this.offset})
      : assert(offset != null),
        super();
}
